-- form_closed.lua
-- Created by zouyb Jun/04/2015
-- 窗口关闭时触发下一个引导

return {
    -- 添加窗口关闭时的回调
    register = function(config)
        local function handle(para)
            if para.name == config.para then
                UIDungeonMgr.getCurLevel().guideMgr:runNext();
            end    
        end

        EventMgr.remove("guide_"..config.para, event.REMOVE_FORM);
        EventMgr.register("guide_"..config.para, event.REMOVE_FORM, handle);
    end,

    -- 删除窗口关闭时的回调
    unRegister = function(config)
        EventMgr.remove("guide_"..config.para, event.REMOVE_FORM);
    end
};